
package com.runjian.demo.base;

import lombok.Getter;
import lombok.Setter;

@Getter
public enum BusinessEnums implements BusinessEnum {
    SUCCESS(200, "OK"),
    VALIDATION_ERROR(400, "参数有误"),
    UNAUTHORIZED(401, "令牌不合法"),
    PAYMENT_REQUIRED(402, "无法访问"),
    FORBIDDEN(403, "权限不足"),
    NOT_FOUND(404, "资源未找到"),
    ERROR(500, "请求失败"),
    WARN(501, "请求无法识别"),
    UNAVAILABLE(503, "服务不可用"),
    RUNTIME_EXCEPTION_ERROR(500000, "系统繁忙，请稍后访问!"),
    REMOTE_EXCEPTION_ERROR(500001, "远程请求中，请稍后访问"),
    TOKEN_IS_NOT_NULL(500002, "令牌不能为空"),
    TOKEN_IS_AUTH_FAIL(500003, "令牌错误!"),
    TOKEN_IS_INVALID(500004, "令牌已失效!"),
    NOT_LOGIN_ERROR(500005, "用户未登录"),
    SIGN_IS_ERROR(500006, "签名不能为空"),
    SIGN_IS_EXCEPTION(500007, "签名错误"),
    AUTH_IS_ERROR(500008, "权限中心请求失败"),
    AUTH_REFUSE_ERROR(500009, "访问拒绝"),
    METHOD_NOT_SUPPORTED(500010, "请求方法不支持"),
    MEDIA_TYPE_NOT_SUPPORT(500011, "媒体类型不支持"),
    IDEMPOTENT_ERROR(500012, "请勿重复操作!"),
    ENUM_IS_NULL(500013, "枚举不存在"),
    VERSION_ERROR(500014, "乐观锁已变化,请刷新数据!"),
    RECORD_IS_NOT_EXIST(500015, "记录不存在或已下架!"),
    RECORD_DOWN_EXIST(500016, "记录已下架!"),
    RECORD_NOT_EXISTS(500020, "记录不存在"),
    RECORD_ADD_FAILURE(500021, "记录新增失败"),
    RECORD_UPDATE_FAILURE(500022, "记录更新失败"),
    RECORD_DELETE_FAILURE(500023, "记录删除失败"),
    DATA_UNUSUAL_ERROR(500024, "数据异常!"),
    DATA_EXISTS_ERROR(500025, "数据已存在!"),
    FILE_NOT_FIND(500026, "文件没有找到"),
    FREQUENT_OPERATION(500027, "操作频繁,请稍后访问!"),
    PRIMARY_ID_IS_NULL(500028, "主键ID必填!"),
    USER_IS_NOT_NULL(500100, "当前用户信息不存在!"),
    USER_IS_NOT_EXIST(500101, "账号不存在!"),
    USER_PWD_ERROR(500102, "账户密码错误!"),
    USER_IS_DISABLE(500103, "当前账号被禁用，请联系系统管理员！"),
    PHONE_IS_EXIST(500104, "手机号已存在!"),
    VERIFICATION_CODE_ERROR(500105, "验证码错误!"),
    NOT_ALLOW_OPERATE(500106, "操作不被允许!"),
    DEFAULT_NOT_ALLOW_OPERATE(500107, "默认数据不能操作"),
    DEVICE_ALREADY_BOUND_ERROR(500108, "请求失败,该设备已被绑定!"),
    DEVICE_UNUSUAL_BOUND_ERROR(500109, "请求失败,该设备数据异常!"),
    DEVICE_LOGIN_TYPE_WEB_ERROR(500110, "该账号只能在web后台登录!"),
    DEVICE_LOGIN_TYPE_APP_ERROR(500111, "该账号只能在APP登录!"),
    USER_IS_EXIST(500112, "账号已存在!"),
    INITIAL_PWD_EXIST(500113, "账号密码错误!"),
    USER_IS_CONFLICT(500114, "账号异常!存在多个账号!"),
    STATUS_IS_NOT_EXIST(500115, "状态不存在!"),
    ROLE_IS_NOT_EXIST(500116, "当前角色已被限制!"),
    NEW_OLD_PWD_ERROR(500102, "操作失败!新密码与旧密码相同!"),
    SIGN_IS_ERROR1(500201, "签名不存在"),
    SIGN_IS_ERROR2(500202, "签名异常"),
    SIGN_IS_ERROR3(500203, "签名过期"),
    SIGN_IS_ERROR4(500204, "签名无效"),
    SIGN_IS_ERROR5(500205, "签名格式错误"),
    SIGN_IS_APPID_NULL(500208, "签名appid不存在"),
    SIGN_IS_NULL(500209, "签名sign不存在"),
    SIGN_IS_SALT_NULL(500210, "签名salt不存在"),
    MEMBER_SERVICE_ERROR(500211, "用户中心服务异常"),
    INTERNAL_CLIENT_NULL(500212, "没有配置内部接口调用客户端"),
    CAPTCHA_IS_ERROR(500213, "图形验证码错误"),
    CAPTCHA_IS_INVALID(500214, "图形验证码已过期"),
    CAPTCHA_IS_NULL(500215, "请输入图形验证码"),
    CAPTCHA_KEY_IS_NULL(500216, "图形验证码key不能为空"),
    SMS_CODE_IS_ERROR(500217, "短信验证码错误"),
    SMS_CODE_IS_NULL(500218, "短信验证码不能为空"),
    TENANT_IS_NOT_NULL(500220, "租户Id必填!"),
    TENANT_IS_INVALID(500221, "租户Id无效!"),
    TENANT_NULL_ERROR(500222, "租户ID不存在!"),
    TENANT_DATA_ERROR(500223, "租户数据异常!"),
    APPID_IS_NOT_NULL(503000, "租户ID不能为空!"),
    APPID_IS_INVALID(503001, "租户ID无效!"),
    APPID_NULL_ERROR(503002, "租户ID必填!"),
    REGISTER_FAIL(503003, "注册失败!"),
    LOGIN_FAIL(503004, "登录失败!"),
    SEND_SMS_FAIL(503005, "发送短信失败!"),
    SEND_SMS_LIMIT_FAIL(503006, "发送短信过于频繁!"),
    LOGIN_ACCOUNT_NULL_ERROR(503007, "账号不能为空!"),
    LOGIN_PASSWORD_NULL_ERROR(503008, "密码不能为空!"),
    SMS_NULL_FAIL(503009, "短信验证码不能为空!"),
    PHONE_NULL_ERROR(503010, "手机号码不能为空!"),
    WECHAT_LOGIN_FAIL(503011, "微信授权登录失败!"),
    WECHAT_USER_NULL_BIND_ERROR(503012, "微信未绑定用户!"),
    PHONE_USER_BIND_FAIL(503013, "手机号绑定失败!"),
    PHONE_EXIST_ERROR(503014, "手机号已经存在!"),
    WECHAT_GET_FAIL(503015, "微信授权失败!"),
    WECHAT_USER_BIND_FAIL(503016, "绑定微信失败!"),
    PHONE_USER_UNBIND_FAIL(503017, "手机号解绑失败!"),
    PASSWORD_CHECK_FAIL(503018, "该密码强度弱,请修改密码!"),
    WECHAT_LOGIN_AND_BIND_FAIL(503019, "微信授权成功,请绑定手机号!"),
    PASSWORD_VERIFY_FAIL(503020, "两次密码输入不一致!"),
    PASSWORD_UPDATE_FAIL(503021, "密码修改失败!"),
    PASSWORD_EQUALS_FAIL(503022, "原密码错误!"),
    PASSWORD_CONSISTENT_FAIL(503023, "修改密码不能与旧密码一致!"),
    EMAIL_EXIST_ERROR(503024, "邮箱已经存在!"),
    AUTH_ERROR(503025, "认证失败!"),
    PHONE_NOT_EXIST(503026, "手机号不存在!"),
    PARAMS_ERROR(551000, "参数错误!"),
    PARAMS_ERROR1(551001, "编码必填!"),
    PLAN_EXIST_ERROR(551002, "方案已存在!"),
    DEVICE_EXIST_ERROR(551003, "设备已存在!"),
    FARM_CODE_NO_EXIST_ERROR(551004, "缺少编码!"),
    DEVICE_INVALID_ERROR(551103, "无效的设备ID值，无法添加!"),
    SAVE_FARM_IMG_ERROR(551105, "保存图片失败，请添加图片!"),
    BUSINESS_ERROR(552000, "业务错误!"),
    NETWORK_ERROR(553000, "网络错误!"),
    DB_ERROR(554000, "数据库错误!"),
    CACHE_ERROR(555000, "缓存错误!"),
    IO_ERROR(556000, "IO错误!"),
    THREE_ERROR(557000, "远程接口错误!"),
    FIRST_LOGIN(10001, "首次登录"),
    LOGIN_PWDCHECK(10002, "请输入6-20位大小写字母+数字随机组成的密码 "),
    LOGIN_PWD_EXPIRE(10003, "您好！系统安全监测到您已超过6个月未修改密码，为不影响正常使用请及时修改密码。"),
    TOKEN_EXPIRED(50001, "token已过期"),
    UNAUTHORIZED_FAIL(50002, "认证失败"),
    FORBIDDEN_FAIL(50003, "无访问权限"),
    INVALID_TOKEN(50004, "token已失效"),
    API_REQUEST_PARAMETER_NOT_PRESENT(51001, "请求参数不存在"),
    API_REQUEST_PARAMETER_TYPE_MISMATCH(51002, "请求参数类型不匹配"),
    API_HTTP_MESSAGE_NOT_READABLE(51003, "请求参数体格式错误"),
    API_REQUEST_VALIDATION_INTERCEPTOR(51004, "无效的请求参数"),
    API_REQUEST_INVALID(51005, "接口业务请求无效"),
    FIRST_LOGIN_PWD_ERROR(51006, "初始密码错误");

    private Integer code;
    private String message;

    private BusinessEnums(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
